﻿Imports System.IO

Public Class DarFormato

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Me.Close()
    End Sub

    Private Sub RichTextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rtxt_CON_FORMATO.TextChanged

        'Esta parte hace que lo que se pegue sea con un formato determinado
        Dim FontName As String = "Microsoft Sans Serif"
        Dim FontSize As Integer = 12
        Dim FS As New Font(FontName, FontSize, FontStyle.Regular)
        rtxt_CON_FORMATO.Font = FS
        'fin de la parte

        rtxt_CON_FORMATO.SaveFile("formato.rtf", RichTextBoxStreamType.RichText)
        rtxt_TEMPORAL.LoadFile("formato.rtf", RichTextBoxStreamType.PlainText)
        rtxt_CON_FORMATO_INFORM.Text = rtxt_TEMPORAL.Text
        Dim valor As Integer
        Dim valornegrita As Integer
        Dim valoritalic As Integer

        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\pard", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\par" & Chr(10) & "}", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, Chr(13), "")
        valorNegrita = InStr(rtxt_CON_FORMATO_INFORM.Text, "\b\f0\fs")
        valoritalic = InStr(rtxt_CON_FORMATO_INFORM.Text, "\i\f0\fs")
        valor = InStr(rtxt_CON_FORMATO_INFORM.Text, "\f0\fs")

        rtxt_CON_FORMATO_INFORM.Text = (Mid(rtxt_CON_FORMATO_INFORM.Text, valor + 9))

        If valornegrita <> 0 Then
            rtxt_CON_FORMATO_INFORM.Text = "[Bold type]" & rtxt_CON_FORMATO_INFORM.Text
        End If
        If valoritalic <> 0 Then
            rtxt_CON_FORMATO_INFORM.Text = "[Italic type]" & rtxt_CON_FORMATO_INFORM.Text
        End If

        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\f1", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\f2", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\f3", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\f4", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\f5", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\f6", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\f7", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\f8", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\f9", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\f10", "")

        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs14 ", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs15 ", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs16 ", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs17 ", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs18 ", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs20 ", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs22 ", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs24 ", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs26 ", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs28 ", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs30 ", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs32 ", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs34 ", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs36 ", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs38 ", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs40 ", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs42 ", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs44 ", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs45 ", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs46 ", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs48 ", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs50 ", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs52 ", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs54 ", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs56 ", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs58 ", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs60 ", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs62 ", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs64 ", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs66 ", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs68 ", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs70 ", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs72 ", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs74 ", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs76 ", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs78 ", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs80 ", "")



        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs14", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs15", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs16", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs17", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs18", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs20", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs22", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs24", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs26", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs28", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs30", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs32", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs34", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs36", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs38", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs40", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs42", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs44", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs45", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs46", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs48", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs50", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs52", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs54", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs56", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs58", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs60", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs62", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs64", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs66", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs68", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs70", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs72", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs74", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs76", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs78", "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\fs80", "")




        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\'e1", "á")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\'e9", "é")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\'ed", "í")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\'f3", "ó")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\'fa", "ú")

        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\'c1", "Á")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\'c9", "É")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\'cd", "Í")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\'d3", "Ó")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\'da", "Ú")

        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\'f1", "ñ")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\'d1", "Ñ")

        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\'b7", "·")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\'80", "€")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\'bf", "¿")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\'a1", "¡")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\'b4", "´")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\'a8", "¨")

        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\i0 ", "[Roman type]")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\i0", "[Roman type]")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\i\b0 ", "[Italic type]")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\i\b0", "[Italic type]")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\i ", "[Italic type]")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\i", "[Italic type]")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\b0 ", "[Roman type]")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\b0", "[Roman type]")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\b\i0 ", "[Bold type]")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\b\i0", "[Bold type]")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\b ", "[Bold type]")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\b", "[Bold type]")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\par} " & Chr(10), "")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\par ", "[line break]")
        rtxt_CON_FORMATO_INFORM.Text = Replace(rtxt_CON_FORMATO_INFORM.Text, "\par", "[line break]")



    End Sub

    Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click
        rtxt_CON_FORMATO.SelectionFont = New Font(FontFamily.GenericSansSerif, 12.0F, FontStyle.Bold)
    End Sub

    Private Sub ToolStripButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click
        rtxt_CON_FORMATO.SelectionFont = New Font(FontFamily.GenericSansSerif, 12.0F, FontStyle.Italic)
    End Sub

    Private Sub ToolStripButton3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton3.Click
        rtxt_CON_FORMATO.SelectionFont = New Font(FontFamily.GenericSansSerif, 12.0F, FontStyle.Regular)
    End Sub

    Private Sub NegritaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NegritaToolStripMenuItem.Click
        rtxt_CON_FORMATO.SelectionFont = New Font(FontFamily.GenericSansSerif, 12.0F, FontStyle.Bold)
    End Sub

    Private Sub ItálicaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ItálicaToolStripMenuItem.Click
        rtxt_CON_FORMATO.SelectionFont = New Font(FontFamily.GenericSansSerif, 12.0F, FontStyle.Italic)
    End Sub

    Private Sub NormalToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NormalToolStripMenuItem.Click
        rtxt_CON_FORMATO.SelectionFont = New Font(FontFamily.GenericSansSerif, 12.0F, FontStyle.Regular)
    End Sub

    Private Sub rtxt_CON_FORMATO_INFORM_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rtxt_CON_FORMATO_INFORM.TextChanged
        If rtxt_CON_FORMATO_INFORM.Text = "\viewkind4\uc1[line break]d\f0\fs24" Then
            rtxt_CON_FORMATO_INFORM.Text = ""
        End If
    End Sub

    Private Sub ToolStripButton4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton4.Click
        rtxt_CON_FORMATO.Text = ""
    End Sub


    Private Sub SeleccionYCopiarTextoFormatoRTFToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SeleccionYCopiarTextoFormatoRTFToolStripMenuItem.Click
        rtxt_CON_FORMATO.SelectAll()
        Clipboard.SetText(rtxt_CON_FORMATO.Text)
    End Sub

    Private Sub CerrarToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CerrarToolStripMenuItem.Click
        Me.Close()
    End Sub

    Private Sub BorrarTextoConFormatoRTF_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BorrarTextoConFormatoRTF.Click
        rtxt_CON_FORMATO.Text = ""
    End Sub

    Private Sub BorrarTextoFormatoINFORMToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BorrarTextoFormatoINFORMToolStripMenuItem.Click
        rtxt_CON_FORMATO_INFORM.Text = ""
    End Sub

    Private Sub ToolStripButtonCerrar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButtonCerrar.Click
        Me.Close()
    End Sub

    Private Sub SeleccionarYCopiarTextoFormatoINFORMToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
     
    End Sub

    Private Sub ContextMenuStripConFormato_Opening(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles ContextMenuStripConFormato.Opening

    End Sub

    Private Sub ContextMenuStripConFormatoInform_Opening(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles ContextMenuStripConFormatoInform.Opening

    End Sub

    Private Sub SeleccionarCopiarYCerrarTextoFormatoINFORMToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SeleccionarCopiarYCerrarTextoFormatoINFORMToolStripMenuItem.Click
        If rtxt_CON_FORMATO_INFORM.Text <> "" Then
            Clipboard.SetText(Microsoft.VisualBasic.Left(rtxt_CON_FORMATO_INFORM.Text, Len(rtxt_CON_FORMATO_INFORM.Text) - 1))
        End If
        Me.Close()
    End Sub

    Private Sub ToolStripSeleccionYCopiaFormatoRTF_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripSeleccionYCopiaFormatoRTF.Click
        rtxt_CON_FORMATO.SelectAll()
        Clipboard.SetText(rtxt_CON_FORMATO.Text)
    End Sub

    Private Sub ToolStripButtonPegarEnTextoConFormatoRTF_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButtonPegarEnTextoConFormatoRTF.Click
        rtxt_CON_FORMATO.Text = Clipboard.GetText
    End Sub

    Private Sub PegarEnTextoFormatoRTFToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PegarEnTextoFormatoRTFToolStripMenuItem.Click
        rtxt_CON_FORMATO.Text = Clipboard.GetText
    End Sub
End Class